class Solution
{
public:
    string removeOccurrences(string s, string part)
    {
        int partLen = part.size();
        while (true)
        {
            auto pos = s.find(part);
            if (pos != string::npos)
            {
                s.replace(pos, partLen, "");
            }
            else
            {
                break;
            }
        }
        return s;
    }
};